Skip to content

[ES|QL] Add support for RRF #221349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 31 commits into from
May 30, 2025
Merged

[ES|QL] Add support for RRF #221349

merged 31 commits into from
May 30, 2025

Conversation

sddonne
Copy link
Contributor

@sddonne sddonne commented May 23, 2025

Summary

Part of #215092

Considerations

RRF may change in the future

@ioanatia has stated that the command may change in the future as it's not fully implemented yet.

Licence check

Will be addressed at #216791

Screen.Recording.2025-05-23.at.12.42.15.mov

New command support checklist

AST support

  • Make sure that the new command is in the local Kibana grammar definition. The ANTLR lexer and parser files are updated every Monday from the source definition of the language at Elasticsearch (via a manually merged, automatically generated PR).
  • Create a factory for generating the new node. The new node should satisfy the ESQLCommand<Name> interface. If the syntax of your command cannot be decomposed only in parameters, you can hold extra information by extending the ESQLCommand interface. I.E., check the Rerank command.
  • While ANTLR is parsing the text query, we create our own AST by using onExit listeners at kbn-esql-ast/src/parser/esql_ast_builder_listener.ts. Implement the onExit<COMMAND_NAME> method based on the interface autogenerated by ANTLR and push the new node into the AST.
  • Create unit tests checking that the correct AST nodes are generated when parsing your command.
  • Add a dedicated visitor callback for the new command.
  • Verify that the Walker API can visit the new node.
  • Verify that the Synth API can construct the new node.

Validating that the command works well when prettifying the query

  • Validate that the prettifier works correctly.
  • Adjust the basic pretty printer and the wrapping pretty printer if needed.
  • Add unit tests validating that the queries are correctly formatted (even if no adjustment has been done).

Creating the command definition

  • Add the definition of the new command at kbn-esql-validation-autocomplete/src/definitions/commands.ts.

Adding the corresponding client-side validations

  • Add a custom validation if needed.
  • Add tests checking the behavior of the validation following this guide.

Adding the autocomplete suggestions

  • Add the suggestions to be shown when positioned at the new command.
    • Create a new folder at kbn-esql-validation-autocomplete/src/autocomplete/commands for your command.
    • Export a suggest function that should return an array of suggestions and set it up into the command definition.
    • Optionally, we must filter or incorporate fields suggestions after a command is executed, this is supported by adding the fieldsSuggestionsAfter method to the command definition. Read this documentation to understand how it works.
  • If the new command must be suggested only in particular situations, modify the corresponding suggestions to make it possible.
  • Add tests following this guide.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

@sddonne sddonne added Feature:ES|QL ES|QL related features in Kibana Team:ESQL ES|QL related features in Kibana backport:skip This commit does not require backporting v9.1.0 release_note:skip Skip the PR/issue when compiling release notes labels May 23, 2025
@sddonne sddonne marked this pull request as ready for review May 23, 2025 11:41
@sddonne sddonne requested a review from a team as a code owner May 23, 2025 11:41
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-esql (Team:ESQL)

@sddonne
Copy link
Contributor Author

sddonne commented May 23, 2025

@elasticmachine merge upstream

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, added some comments.

Also RRF is on snapshot releases (which means we are not ready to suggest them). With your changes it is going to appear and we don't want it.

I am not sure if utilizing the hidden flag is a correct decision here. Ideally I want to have hidden true if it is still on snaphsots and find another way to hide it when it makes sense only after specific commands.

cc @drewdaemon

@drewdaemon
Copy link
Contributor

I am not sure if utilizing the hidden flag is a correct decision here. Ideally I want to have hidden true if it is still on snaphsots and find another way to hide it when it makes sense only after specific commands.

This makes me wonder again if we should be treating RRF-after-FORK as a special case instead of trying to build a generic system for this.

I don't think it's a bad system @sddonne has set up here, but the autocomplete refactor was supposed to fix the anti-pattern of adding "generic" properties to the command definitions to support quirks only found in a single command. If we just handled RRF as a one-off in the top-level suggest method it might

  • be more clear what is actually going on
  • avoid growing the command definition interface
  • avoid using hidden in this new way

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thanx Sebastian for taking care of the feedback. I left 2 comments but I am approving as I don't need to check them again.

@sddonne sddonne removed the request for review from vadimkibana May 27, 2025 11:06
Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. I left a few comments. I'm approving with the assumption that those will be taken care of before merging.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
esql 227 229 +2
lists 454 456 +2
securitySolution 7450 7452 +2
stackAlerts 281 283 +2
unifiedSearch 388 390 +2
total +10

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/esql-validation-autocomplete 163 164 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-srcJs 3.7MB 3.7MB +1.5KB
Unknown metric groups

API count

id before after diff
@kbn/esql-validation-autocomplete 184 185 +1

History

@sddonne sddonne merged commit 0794030 into elastic:main May 30, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15342485445

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.19 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 221349

Questions ?

Please refer to the Backport tool documentation

@sddonne
Copy link
Contributor Author

sddonne commented May 30, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

sddonne added a commit to sddonne/kibana that referenced this pull request May 30, 2025
## Summary

Part of elastic#215092

## Considerations
### `RRF` may change in the future
@ioanatia has stated that the command may change in the future as it's
not fully implemented yet.

### Licence check
Will be addressed at elastic#216791

https://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95

## New command support checklist
### AST support
- [x] Make sure that the new command is in the local Kibana grammar
definition. The ANTLR lexer and parser files are updated every Monday
from the source definition of the language at Elasticsearch (via a
manually merged, automatically generated
[PR](elastic#213006)).
- [x] Create a factory for generating the new node. The new node should
satisfy the `ESQLCommand<Name>` interface. If the syntax of your command
cannot be decomposed only in parameters, you can hold extra information
by extending the `ESQLCommand` interface. I.E., check the Rerank
command.
- [x] While ANTLR is parsing the text query, we create our own AST by
using `onExit` listeners at
`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement the
`onExit<COMMAND_NAME>` method based on the interface autogenerated by
ANTLR and push the new node into the AST.
- [x] Create unit tests checking that the correct AST nodes are
generated when parsing your command.
- [x] Add a dedicated [visitor
callback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)
for the new command.
- [x] Verify that the `Walker` API can visit the new node.
- [x] Verify that the `Synth` API can construct the new node.

### Validating that the command works well when prettifying the query
- [x] Validate that the prettifier works correctly.
- [ ] Adjust the basic pretty printer and the wrapping pretty printer if
needed.
- [x] Add unit tests validating that the queries are correctly formatted
(even if no adjustment has been done).

### Creating the command definition
- [x] Add the definition of the new command at
`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.

### Adding the corresponding client-side validations
- [x] Add a custom validation if needed.
- [x] Add tests checking the behavior of the validation following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).

### Adding the autocomplete suggestions
- [x] Add the suggestions to be shown when **positioned at** the new
command.
- [x] Create a new folder at
`kbn-esql-validation-autocomplete/src/autocomplete/commands` for your
command.
- [x] Export a `suggest` function that should return an array of
suggestions and set it up into the command definition.
- [ ] Optionally, we must filter or incorporate fields suggestions after
a command is executed, this is supported by adding the
`fieldsSuggestionsAfter` method to the command definition. Read this
documentation to understand how it works.
- [x] If the new command must be suggested only in particular
situations, modify the corresponding suggestions to make it possible.
- [x] Add tests following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
(cherry picked from commit 0794030)

# Conflicts:
#	src/platform/packages/shared/kbn-esql-validation-autocomplete/src/definitions/commands.ts
sddonne added a commit to sddonne/kibana that referenced this pull request May 30, 2025
## Summary

Part of elastic#215092

## Considerations
### `RRF` may change in the future
@ioanatia has stated that the command may change in the future as it's
not fully implemented yet.

### Licence check
Will be addressed at elastic#216791

https://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95

## New command support checklist
### AST support
- [x] Make sure that the new command is in the local Kibana grammar
definition. The ANTLR lexer and parser files are updated every Monday
from the source definition of the language at Elasticsearch (via a
manually merged, automatically generated
[PR](elastic#213006)).
- [x] Create a factory for generating the new node. The new node should
satisfy the `ESQLCommand<Name>` interface. If the syntax of your command
cannot be decomposed only in parameters, you can hold extra information
by extending the `ESQLCommand` interface. I.E., check the Rerank
command.
- [x] While ANTLR is parsing the text query, we create our own AST by
using `onExit` listeners at
`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement the
`onExit<COMMAND_NAME>` method based on the interface autogenerated by
ANTLR and push the new node into the AST.
- [x] Create unit tests checking that the correct AST nodes are
generated when parsing your command.
- [x] Add a dedicated [visitor
callback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)
for the new command.
- [x] Verify that the `Walker` API can visit the new node.
- [x] Verify that the `Synth` API can construct the new node.

### Validating that the command works well when prettifying the query
- [x] Validate that the prettifier works correctly.
- [ ] Adjust the basic pretty printer and the wrapping pretty printer if
needed.
- [x] Add unit tests validating that the queries are correctly formatted
(even if no adjustment has been done).

### Creating the command definition
- [x] Add the definition of the new command at
`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.

### Adding the corresponding client-side validations
- [x] Add a custom validation if needed.
- [x] Add tests checking the behavior of the validation following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).

### Adding the autocomplete suggestions
- [x] Add the suggestions to be shown when **positioned at** the new
command.
- [x] Create a new folder at
`kbn-esql-validation-autocomplete/src/autocomplete/commands` for your
command.
- [x] Export a `suggest` function that should return an array of
suggestions and set it up into the command definition.
- [ ] Optionally, we must filter or incorporate fields suggestions after
a command is executed, this is supported by adding the
`fieldsSuggestionsAfter` method to the command definition. Read this
documentation to understand how it works.
- [x] If the new command must be suggested only in particular
situations, modify the corresponding suggestions to make it possible.
- [x] Add tests following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
(cherry picked from commit 0794030)

# Conflicts:
#	src/platform/packages/shared/kbn-esql-validation-autocomplete/src/definitions/commands.ts
@sddonne
Copy link
Contributor Author

sddonne commented May 30, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

sddonne added a commit to sddonne/kibana that referenced this pull request Jun 2, 2025
## Summary

Part of elastic#215092

## Considerations
### `RRF` may change in the future
@ioanatia has stated that the command may change in the future as it's
not fully implemented yet.

### Licence check
Will be addressed at elastic#216791

https://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95

## New command support checklist
### AST support
- [x] Make sure that the new command is in the local Kibana grammar
definition. The ANTLR lexer and parser files are updated every Monday
from the source definition of the language at Elasticsearch (via a
manually merged, automatically generated
[PR](elastic#213006)).
- [x] Create a factory for generating the new node. The new node should
satisfy the `ESQLCommand<Name>` interface. If the syntax of your command
cannot be decomposed only in parameters, you can hold extra information
by extending the `ESQLCommand` interface. I.E., check the Rerank
command.
- [x] While ANTLR is parsing the text query, we create our own AST by
using `onExit` listeners at
`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement the
`onExit<COMMAND_NAME>` method based on the interface autogenerated by
ANTLR and push the new node into the AST.
- [x] Create unit tests checking that the correct AST nodes are
generated when parsing your command.
- [x] Add a dedicated [visitor
callback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)
for the new command.
- [x] Verify that the `Walker` API can visit the new node.
- [x] Verify that the `Synth` API can construct the new node.

### Validating that the command works well when prettifying the query
- [x] Validate that the prettifier works correctly.
- [ ] Adjust the basic pretty printer and the wrapping pretty printer if
needed.
- [x] Add unit tests validating that the queries are correctly formatted
(even if no adjustment has been done).

### Creating the command definition
- [x] Add the definition of the new command at
`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.

### Adding the corresponding client-side validations
- [x] Add a custom validation if needed.
- [x] Add tests checking the behavior of the validation following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).

### Adding the autocomplete suggestions
- [x] Add the suggestions to be shown when **positioned at** the new
command.
- [x] Create a new folder at
`kbn-esql-validation-autocomplete/src/autocomplete/commands` for your
command.
- [x] Export a `suggest` function that should return an array of
suggestions and set it up into the command definition.
- [ ] Optionally, we must filter or incorporate fields suggestions after
a command is executed, this is supported by adding the
`fieldsSuggestionsAfter` method to the command definition. Read this
documentation to understand how it works.
- [x] If the new command must be suggested only in particular
situations, modify the corresponding suggestions to make it possible.
- [x] Add tests following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
(cherry picked from commit 0794030)
@sddonne
Copy link
Contributor Author

sddonne commented Jun 2, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

sddonne added a commit that referenced this pull request Jun 2, 2025
# Backport

This will backport the following commits from `main` to `8.19`:
- [[ES|QL] Add support for `RRF`
(#221349)](#221349)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Sebastian Delle
Donne","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-30T08:21:20Z","message":"[ES|QL]
Add support for `RRF` (#221349)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/215092\n\n##
Considerations\n### `RRF` may change in the future\n@ioanatia has stated
that the command may change in the future as it's\nnot fully implemented
yet.\n\n### Licence check\nWill be addressed at
https://github.com/elastic/kibana/issues/216791\n\n\n\nhttps://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95\n\n\n##
New command support checklist\n### AST support\n- [x] Make sure that the
new command is in the local Kibana grammar\ndefinition. The ANTLR lexer
and parser files are updated every Monday\nfrom the source definition of
the language at Elasticsearch (via a\nmanually merged, automatically
generated\n[PR](https://github.com/elastic/kibana/pull/213006)).\n- [x]
Create a factory for generating the new node. The new node
should\nsatisfy the `ESQLCommand<Name>` interface. If the syntax of your
command\ncannot be decomposed only in parameters, you can hold extra
information\nby extending the `ESQLCommand` interface. I.E., check the
Rerank\ncommand.\n- [x] While ANTLR is parsing the text query, we create
our own AST by\nusing `onExit` listeners
at\n`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement
the\n`onExit<COMMAND_NAME>` method based on the interface autogenerated
by\nANTLR and push the new node into the AST.\n- [x] Create unit tests
checking that the correct AST nodes are\ngenerated when parsing your
command.\n- [x] Add a dedicated
[visitor\ncallback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)\nfor
the new command.\n- [x] Verify that the `Walker` API can visit the new
node.\n- [x] Verify that the `Synth` API can construct the new
node.\n\n### Validating that the command works well when prettifying the
query\n- [x] Validate that the prettifier works correctly.\n- [ ] Adjust
the basic pretty printer and the wrapping pretty printer if\nneeded.\n-
[x] Add unit tests validating that the queries are correctly
formatted\n(even if no adjustment has been done).\n\n\n### Creating the
command definition\n- [x] Add the definition of the new command
at\n`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.\n\n###
Adding the corresponding client-side validations\n- [x] Add a custom
validation if needed.\n- [x] Add tests checking the behavior of the
validation following
this\n[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).\n\n\n###
Adding the autocomplete suggestions\n- [x] Add the suggestions to be
shown when **positioned at** the new\ncommand.\n- [x] Create a new
folder at\n`kbn-esql-validation-autocomplete/src/autocomplete/commands`
for your\ncommand.\n- [x] Export a `suggest` function that should return
an array of\nsuggestions and set it up into the command definition.\n- [
] Optionally, we must filter or incorporate fields suggestions after\na
command is executed, this is supported by adding
the\n`fieldsSuggestionsAfter` method to the command definition. Read
this\ndocumentation to understand how it works.\n- [x] If the new
command must be suggested only in particular\nsituations, modify the
corresponding suggestions to make it possible.\n- [x] Add tests
following
this\n[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>\nCo-authored-by: Stratoula
Kalafateli <[email protected]>\nCo-authored-by: Drew Tate
<[email protected]>","sha":"0794030590e7489d0bda81b25beddd4713457d25","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL]
Add support for `RRF`
","number":221349,"url":"https://github.com/elastic/kibana/pull/221349","mergeCommit":{"message":"[ES|QL]
Add support for `RRF` (#221349)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/215092\n\n##
Considerations\n### `RRF` may change in the future\n@ioanatia has stated
that the command may change in the future as it's\nnot fully implemented
yet.\n\n### Licence check\nWill be addressed at
https://github.com/elastic/kibana/issues/216791\n\n\n\nhttps://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95\n\n\n##
New command support checklist\n### AST support\n- [x] Make sure that the
new command is in the local Kibana grammar\ndefinition. The ANTLR lexer
and parser files are updated every Monday\nfrom the source definition of
the language at Elasticsearch (via a\nmanually merged, automatically
generated\n[PR](https://github.com/elastic/kibana/pull/213006)).\n- [x]
Create a factory for generating the new node. The new node
should\nsatisfy the `ESQLCommand<Name>` interface. If the syntax of your
command\ncannot be decomposed only in parameters, you can hold extra
information\nby extending the `ESQLCommand` interface. I.E., check the
Rerank\ncommand.\n- [x] While ANTLR is parsing the text query, we create
our own AST by\nusing `onExit` listeners
at\n`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement
the\n`onExit<COMMAND_NAME>` method based on the interface autogenerated
by\nANTLR and push the new node into the AST.\n- [x] Create unit tests
checking that the correct AST nodes are\ngenerated when parsing your
command.\n- [x] Add a dedicated
[visitor\ncallback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)\nfor
the new command.\n- [x] Verify that the `Walker` API can visit the new
node.\n- [x] Verify that the `Synth` API can construct the new
node.\n\n### Validating that the command works well when prettifying the
query\n- [x] Validate that the prettifier works correctly.\n- [ ] Adjust
the basic pretty printer and the wrapping pretty printer if\nneeded.\n-
[x] Add unit tests validating that the queries are correctly
formatted\n(even if no adjustment has been done).\n\n\n### Creating the
command definition\n- [x] Add the definition of the new command
at\n`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.\n\n###
Adding the corresponding client-side validations\n- [x] Add a custom
validation if needed.\n- [x] Add tests checking the behavior of the
validation following
this\n[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).\n\n\n###
Adding the autocomplete suggestions\n- [x] Add the suggestions to be
shown when **positioned at** the new\ncommand.\n- [x] Create a new
folder at\n`kbn-esql-validation-autocomplete/src/autocomplete/commands`
for your\ncommand.\n- [x] Export a `suggest` function that should return
an array of\nsuggestions and set it up into the command definition.\n- [
] Optionally, we must filter or incorporate fields suggestions after\na
command is executed, this is supported by adding
the\n`fieldsSuggestionsAfter` method to the command definition. Read
this\ndocumentation to understand how it works.\n- [x] If the new
command must be suggested only in particular\nsituations, modify the
corresponding suggestions to make it possible.\n- [x] Add tests
following
this\n[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>\nCo-authored-by: Stratoula
Kalafateli <[email protected]>\nCo-authored-by: Drew Tate
<[email protected]>","sha":"0794030590e7489d0bda81b25beddd4713457d25"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/221349","number":221349,"mergeCommit":{"message":"[ES|QL]
Add support for `RRF` (#221349)\n\n## Summary\n\nPart of
https://github.com/elastic/kibana/issues/215092\n\n##
Considerations\n### `RRF` may change in the future\n@ioanatia has stated
that the command may change in the future as it's\nnot fully implemented
yet.\n\n### Licence check\nWill be addressed at
https://github.com/elastic/kibana/issues/216791\n\n\n\nhttps://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95\n\n\n##
New command support checklist\n### AST support\n- [x] Make sure that the
new command is in the local Kibana grammar\ndefinition. The ANTLR lexer
and parser files are updated every Monday\nfrom the source definition of
the language at Elasticsearch (via a\nmanually merged, automatically
generated\n[PR](https://github.com/elastic/kibana/pull/213006)).\n- [x]
Create a factory for generating the new node. The new node
should\nsatisfy the `ESQLCommand<Name>` interface. If the syntax of your
command\ncannot be decomposed only in parameters, you can hold extra
information\nby extending the `ESQLCommand` interface. I.E., check the
Rerank\ncommand.\n- [x] While ANTLR is parsing the text query, we create
our own AST by\nusing `onExit` listeners
at\n`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement
the\n`onExit<COMMAND_NAME>` method based on the interface autogenerated
by\nANTLR and push the new node into the AST.\n- [x] Create unit tests
checking that the correct AST nodes are\ngenerated when parsing your
command.\n- [x] Add a dedicated
[visitor\ncallback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)\nfor
the new command.\n- [x] Verify that the `Walker` API can visit the new
node.\n- [x] Verify that the `Synth` API can construct the new
node.\n\n### Validating that the command works well when prettifying the
query\n- [x] Validate that the prettifier works correctly.\n- [ ] Adjust
the basic pretty printer and the wrapping pretty printer if\nneeded.\n-
[x] Add unit tests validating that the queries are correctly
formatted\n(even if no adjustment has been done).\n\n\n### Creating the
command definition\n- [x] Add the definition of the new command
at\n`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.\n\n###
Adding the corresponding client-side validations\n- [x] Add a custom
validation if needed.\n- [x] Add tests checking the behavior of the
validation following
this\n[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).\n\n\n###
Adding the autocomplete suggestions\n- [x] Add the suggestions to be
shown when **positioned at** the new\ncommand.\n- [x] Create a new
folder at\n`kbn-esql-validation-autocomplete/src/autocomplete/commands`
for your\ncommand.\n- [x] Export a `suggest` function that should return
an array of\nsuggestions and set it up into the command definition.\n- [
] Optionally, we must filter or incorporate fields suggestions after\na
command is executed, this is supported by adding
the\n`fieldsSuggestionsAfter` method to the command definition. Read
this\ndocumentation to understand how it works.\n- [x] If the new
command must be suggested only in particular\nsituations, modify the
corresponding suggestions to make it possible.\n- [x] Add tests
following
this\n[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [ ] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [ ] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\nDoes this PR introduce any risks? For example,
consider risks like hard\nto test bugs, performance regression,
potential of data loss.\n\nDescribe the risk, its severity, and
mitigation for each identified\nrisk. Invite stakeholders and evaluate
how to proceed before merging.\n\n- [ ] [See some
risk\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)\n-
[ ] ...\n\n---------\n\nCo-authored-by: Elastic Machine
<[email protected]>\nCo-authored-by: Stratoula
Kalafateli <[email protected]>\nCo-authored-by: Drew Tate
<[email protected]>","sha":"0794030590e7489d0bda81b25beddd4713457d25"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
zacharyparikh pushed a commit to zacharyparikh/kibana that referenced this pull request Jun 4, 2025
## Summary

Part of elastic#215092

## Considerations
### `RRF` may change in the future
@ioanatia has stated that the command may change in the future as it's
not fully implemented yet.

### Licence check
Will be addressed at elastic#216791



https://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95


## New command support checklist
### AST support
- [x] Make sure that the new command is in the local Kibana grammar
definition. The ANTLR lexer and parser files are updated every Monday
from the source definition of the language at Elasticsearch (via a
manually merged, automatically generated
[PR](elastic#213006)).
- [x] Create a factory for generating the new node. The new node should
satisfy the `ESQLCommand<Name>` interface. If the syntax of your command
cannot be decomposed only in parameters, you can hold extra information
by extending the `ESQLCommand` interface. I.E., check the Rerank
command.
- [x] While ANTLR is parsing the text query, we create our own AST by
using `onExit` listeners at
`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement the
`onExit<COMMAND_NAME>` method based on the interface autogenerated by
ANTLR and push the new node into the AST.
- [x] Create unit tests checking that the correct AST nodes are
generated when parsing your command.
- [x] Add a dedicated [visitor
callback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)
for the new command.
- [x] Verify that the `Walker` API can visit the new node.
- [x] Verify that the `Synth` API can construct the new node.

### Validating that the command works well when prettifying the query
- [x] Validate that the prettifier works correctly.
- [ ] Adjust the basic pretty printer and the wrapping pretty printer if
needed.
- [x] Add unit tests validating that the queries are correctly formatted
(even if no adjustment has been done).


### Creating the command definition
- [x] Add the definition of the new command at
`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.

### Adding the corresponding client-side validations
- [x] Add a custom validation if needed.
- [x] Add tests checking the behavior of the validation following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).


### Adding the autocomplete suggestions
- [x] Add the suggestions to be shown when **positioned at** the new
command.
- [x] Create a new folder at
`kbn-esql-validation-autocomplete/src/autocomplete/commands` for your
command.
- [x] Export a `suggest` function that should return an array of
suggestions and set it up into the command definition.
- [ ] Optionally, we must filter or incorporate fields suggestions after
a command is executed, this is supported by adding the
`fieldsSuggestionsAfter` method to the command definition. Read this
documentation to understand how it works.
- [x] If the new command must be suggested only in particular
situations, modify the corresponding suggestions to make it possible.
- [x] Add tests following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
nickpeihl pushed a commit to nickpeihl/kibana that referenced this pull request Jun 12, 2025
## Summary

Part of elastic#215092

## Considerations
### `RRF` may change in the future
@ioanatia has stated that the command may change in the future as it's
not fully implemented yet.

### Licence check
Will be addressed at elastic#216791



https://github.com/user-attachments/assets/759470a2-4afa-4d20-adbf-cb3001895e95


## New command support checklist
### AST support
- [x] Make sure that the new command is in the local Kibana grammar
definition. The ANTLR lexer and parser files are updated every Monday
from the source definition of the language at Elasticsearch (via a
manually merged, automatically generated
[PR](elastic#213006)).
- [x] Create a factory for generating the new node. The new node should
satisfy the `ESQLCommand<Name>` interface. If the syntax of your command
cannot be decomposed only in parameters, you can hold extra information
by extending the `ESQLCommand` interface. I.E., check the Rerank
command.
- [x] While ANTLR is parsing the text query, we create our own AST by
using `onExit` listeners at
`kbn-esql-ast/src/parser/esql_ast_builder_listener.ts`. Implement the
`onExit<COMMAND_NAME>` method based on the interface autogenerated by
ANTLR and push the new node into the AST.
- [x] Create unit tests checking that the correct AST nodes are
generated when parsing your command.
- [x] Add a dedicated [visitor
callback](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-ast/src/visitor/README.md)
for the new command.
- [x] Verify that the `Walker` API can visit the new node.
- [x] Verify that the `Synth` API can construct the new node.

### Validating that the command works well when prettifying the query
- [x] Validate that the prettifier works correctly.
- [ ] Adjust the basic pretty printer and the wrapping pretty printer if
needed.
- [x] Add unit tests validating that the queries are correctly formatted
(even if no adjustment has been done).


### Creating the command definition
- [x] Add the definition of the new command at
`kbn-esql-validation-autocomplete/src/definitions/commands.ts`.

### Adding the corresponding client-side validations
- [x] Add a custom validation if needed.
- [x] Add tests checking the behavior of the validation following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#the-new-way).


### Adding the autocomplete suggestions
- [x] Add the suggestions to be shown when **positioned at** the new
command.
- [x] Create a new folder at
`kbn-esql-validation-autocomplete/src/autocomplete/commands` for your
command.
- [x] Export a `suggest` function that should return an array of
suggestions and set it up into the command definition.
- [ ] Optionally, we must filter or incorporate fields suggestions after
a command is executed, this is supported by adding the
`fieldsSuggestionsAfter` method to the command definition. Read this
documentation to understand how it works.
- [x] If the new command must be suggested only in particular
situations, modify the corresponding suggestions to make it possible.
- [x] Add tests following this
[guide](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md#automated-testing).


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <[email protected]>
Co-authored-by: Stratoula Kalafateli <[email protected]>
Co-authored-by: Drew Tate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:ES|QL ES|QL related features in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:ESQL ES|QL related features in Kibana v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants